package com.wjc.myktapplication.data

import com.wjc.myktapplication.data.bean.ArticleResponseBody
import com.wjc.myktapplication.data.wxaccount.WxAccountBean
import com.wjc.network.ResponseResult
import io.reactivex.rxjava3.core.Observable
import io.reactivex.rxjava3.core.Single
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query


/**
 * ClassName: com.wjc.myktapplication.model
 * Description:
 * JcChen on 2021.04.17.10:31
 */
interface NetworkApi {

    @GET("/wxarticle/chapters/json  ")
    fun fetchWxArticleList(): Single<ResponseResult<MutableList<WxAccountBean>>>

    @GET("/wxarticle/chapters/json")
    suspend fun fetchWxArticleListS(): ResponseResult<MutableList<WxAccountBean>>

    @GET("/wxarticle/chapters/json")
    suspend fun fetchWxArticleListF(): ResponseResult<MutableList<WxAccountBean>>

    // 获取Tag文章  article/list/0/json?cid=409
    @GET("article/list/{page}/json")
    suspend fun getArticleByTag(@Path("page") page: Int, @Query("cid") cid: Int): ResponseResult<ArticleResponseBody>

}